<ui:composition template="/WEB-INF/templates/login-template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

	<ui:define name="menu"></ui:define>
	<ui:define name="submenu"></ui:define>
	<ui:define name="sidebar">
		<ui:include src="/WEB-INF/templates/public-sidebar.xhtml" />
	</ui:define>
	<ui:define name="content">	
		
		
		<h:form> 
		 <p:growl/>
		 <h:panelGrid id="printPage">
		 <h:outputText value="Asset Request Form" styleClass="outputTextTitle"/>	
		 <p:panel header="Employee Details"> 
		   <h:panelGrid columns="4" style="border:0;" cellspacing="8">
		          
           <h:outputLabel value="" />
           <h:outputLabel value="Asset Code" />
           <h:outputLabel value=":" />
           <h:outputText value="#{viewAssetRequestsBean.assetRequest.assetReferenceCode}" />
           
           <h:outputLabel value="" />
           <h:outputLabel value="Request Date" />
           <h:outputLabel value=":" />
           <h:outputText value="#{viewAssetRequestsBean.assetRequest.requestDate}" >
           		<f:convertDateTime pattern="dd-MMM-yyyy HH:mm a"/> 
           </h:outputText>
          
           <h:outputLabel value=""  />
           <h:outputLabel value="Employee Name " />
           <h:outputLabel value=":" />
           <h:outputText value="#{viewAssetRequestsBean.assetRequest.employee.firstName} #{viewAssetRequestsBean.assetRequest.employee.lastName}" />
		              
           <h:outputLabel value=""  />
           <h:outputLabel value="Recommended By" />
           <h:outputLabel value=":" />
           <h:outputText value="#{viewAssetRequestsBean.assetRequest.recommendedBy.firstName} #{viewAssetRequestsBean.assetRequest.recommendedBy.lastName}" />
          
           <h:outputLabel value="" />
           <h:outputLabel value="Approved By " />
           <h:outputLabel value=":" />
           <h:outputText value="#{viewAssetRequestsBean.assetRequest.approvedBy.firstName} #{viewAssetRequestsBean.assetRequest.approvedBy.lastName}"  />
           
          </h:panelGrid>
          </p:panel>
          
          <p:panel header="Assets">            
           
           <p:dataTable  value="#{viewAssetRequestsBean.assetDetailsList}" var="newAsset" >   
  
		            <p:column headerText="Asset Type"> 
		              	<h:outputText value="#{newAsset.assetType}" />                 
		            </p:column>  
		  
		            <p:column headerText="Required On"> 
		              	<h:outputText value="#{newAsset.requiredDate}" > 
		              		<f:convertDateTime pattern="dd-MMM-yyyy"/>
		              	</h:outputText> 	               
		            </p:column>  
		            
		            <p:column headerText="Return Date"> 
		              	<h:outputText value="#{newAsset.expectedReturnDate}" >
		              		<f:convertDateTime pattern="dd-MMM-yyyy"/>
		              	</h:outputText>                  
		            </p:column>  
		            
		            <p:column headerText="Purpose"> 
		              	<h:outputText value="#{newAsset.purpose}" />  	               
		            </p:column>  
		            
		            <p:column headerText="Remarks"> 
		              	<h:outputText value="#{newAsset.remarks}" />                 
		            </p:column>  
			       
          </p:dataTable>
          <br/>
           <h:panelGrid cellspacing="7">
                <h:panelGroup>
	             	<h:outputText value="Recommender Comments :" style="font-weight:bold;" />
	             	<font face="comic sans MS, new york, times" size="2"><b> #{viewAssetRequestsBean.assetRequest.recommenderComments}</b></font>
             	</h:panelGroup>
             	<h:outputText value="Approver Status : #{viewAssetRequestsBean.assetRequest.approverStatus}" style="font-weight:bold;" />
             	<h:panelGroup>
	             	<h:outputText value="Approver Comments :" style="font-weight:bold;" />
	             	<font face="comic sans MS, new york, times" size="2"><b> #{viewAssetRequestsBean.assetRequest.approverComments}</b></font>
             	</h:panelGroup>
		   </h:panelGrid> 
          </p:panel> 
          </h:panelGrid>
         <p:commandButton value="Print" type="button" icon="ui-icon-print" style="float:center;" >  
			        <p:printer target="printPage" />  
		 </p:commandButton>
          
        
		
		
     </h:form>
	</ui:define>
	
</ui:composition>
